package processor.procurement;

import model.payment.*;
import model.procurement.ProcurementContent;

public class PointsExchange extends ProcurementPage {

    String pointExchange(ProcurementContent procurementContent) {
        String log = buildOperator(getUser(), getPayment(), procurementContent, "积分兑换页面");

        // 当消费金额 >= 200时触发
        if (overThreshold()) {
            log += "，疑似潜在脱坑客户";
        }
        return record(log);
    }

    // 判断是否超过设置值
    private boolean overThreshold() {
        return getPayment().getConsumptionAmount() >= 200;
    }
}